/*     */ package com.lmpop.trade.ti_user_dataright;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_user_datarightInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_user_datarightInfo()
/*     */   {
/*  16 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  26 */     Ti_user_dataright ti_user_dataright = new Ti_user_dataright();
/*     */ 
/*  28 */     ti_user_dataright.setCust_id(map.getString("cust_id"));
/*  29 */     ti_user_dataright.setUser_id(map.getString("user_id"));
/*  30 */     ti_user_dataright.setData_type("0");
/*  31 */     ti_user_dataright.setData_str(map.getString("data_str"));
/*  32 */     ti_user_dataright.setRight_type("1");
/*  33 */     ti_user_dataright.setRsrv_str1(map.getString("rsrv_str1"));
/*  34 */     ti_user_dataright.setRsrv_str2(map.getString("rsrv_str2"));
/*  35 */     ti_user_dataright.setRsrv_str3(map.getString("rsrv_str3"));
/*  36 */     ti_user_dataright.setIn_user_id(map.getString("in_user_id"));
/*  37 */     String result_code = "0";
/*  38 */     String result_info = "";
/*     */     try
/*     */     {
/*  41 */       insert(dbmMgr, ti_user_dataright);
/*     */     } catch (ApplicationException e) {
/*  43 */       e.printStackTrace();
/*  44 */       result_code = "1";
/*     */     }
/*  46 */     map.setString("result_code", result_code);
/*  47 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_user_dataright ti_user_dataright)
/*     */     throws ApplicationException
/*     */   {
/*  57 */     dbmMgr.update("insertTi_user_dataright", ti_user_dataright);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  64 */     String pkid_string = map.getString("pkid");
/*  65 */     String user_id = map.getString("user_id");
/*  66 */     Hashtable datamaps = new Hashtable();
/*  67 */     datamaps.put("data_str", pkid_string);
/*  68 */     datamaps.put("user_id", user_id);
/*  69 */     String result_code = "0";
/*     */     try {
/*  71 */       delete(dbmMgr, datamaps);
/*     */     }
/*     */     catch (ApplicationException e) {
/*  74 */       e.printStackTrace();
/*  75 */       result_code = "1";
/*     */     }
/*  77 */     map.setString("result_code", result_code);
/*  78 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, Hashtable datamaps)
/*     */     throws ApplicationException
/*     */   {
/*  87 */     dbmMgr.update("deleteTi_user_dataright", datamaps);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  96 */     Ti_user_dataright ti_user_dataright = new Ti_user_dataright();
/*     */ 
/* 100 */     String result_code = "0";
/*     */     try {
/* 102 */       update(dbmMgr, ti_user_dataright);
/*     */     } catch (ApplicationException e) {
/* 104 */       e.printStackTrace();
/* 105 */       result_code = "1";
/*     */     }
/* 107 */     map.setString("result_code", result_code);
/* 108 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_user_dataright ti_user_dataright)
/*     */     throws ApplicationException
/*     */   {
/* 117 */     dbmMgr.update("updateTi_user_dataright", ti_user_dataright);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 123 */     Map ti_user_dataright = (Hashtable)obj;
/* 124 */     if (start == 0)
/* 125 */       start = 0;
/*     */     else {
/* 127 */       start = (start - 1) * limit;
/*     */     }
/* 129 */     ti_user_dataright.put("start", Integer.valueOf(start));
/* 130 */     ti_user_dataright.put("limit", Integer.valueOf(limit));
/* 131 */     return this.queryList.getList("getListByTi_user_datarightPage", ti_user_dataright);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 142 */     Map ti_user_dataright = (Hashtable)obj;
/* 143 */     List list = this.queryList.getList("getCountByObjTi_user_dataright", obj);
/* 144 */     int count = 0;
/* 145 */     if ((list != null) && (list.size() > 0)) {
/* 146 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 147 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 148 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 151 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 161 */     return this.queryList.getList("getTi_user_datarightByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_user_dataright.Ti_user_datarightInfo
 * JD-Core Version:    0.6.0
 */